home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / Telephone Manager 1.1.1 / Install / Development / Telephones.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-20  |  37.5 KB  |  1,015 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4.  Telephones.h
  5.  C Interface to the Telephone Manager
  6.  
  7.  
  8.   Copyright Apple Computer, Inc. 1990-1993
  9.   All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __TELEPHONES__
  15. #define __TELEPHONES__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __EVENTS__
  22. #include <Events.h>
  23. #endif
  24.  
  25. #ifndef __DIALOGS__
  26. #include <Dialogs.h>
  27. #endif
  28.  
  29. #ifndef __CTBUTILITIES__
  30. #include <CTBUtilities.h>
  31. #endif
  32.  
  33.  
  34. #ifndef classTEL
  35. enum {
  36.     classTEL =        'vbnd'                /* telephone tool file type */
  37. };
  38. #endif
  39.  
  40.  
  41. enum {
  42.     
  43.     curTELVersion = 2,                    /* current Telephone Manager version */
  44.  
  45. /* TELErr */
  46.  
  47.     telGenericError = -1,
  48.     telNoErr = 0,
  49.     telNoTools = 8,                        /* no telephone tools found in extension folder */
  50.     
  51.     telBadTermErr        = (-10001),        /* invalid TELHandle or handle not found*/
  52.     telBadDNErr            = (-10002),        /* TELDNHandle not found or invalid */
  53.     telBadCAErr            = (-10003),        /* TELCAHandle not found or invalid */
  54.     telBadHandErr        = (-10004),        /* bad handle specified */
  55.     telBadProcErr        = (-10005),        /* bad msgProc specified */
  56.     telCAUnavail        = (-10006),        /* a CA is not available */
  57.     telNoMemErr            = (-10007),        /* no memory to allocate handle */
  58.     telNoOpenErr        = (-10008),        /* unable to open terminal */
  59.     
  60.     telBadHTypeErr        = (-10010),        /* bad hook type specified */
  61.     telHTypeNotSupp        = (-10011),        /* hook type not supported by this tool */
  62.     telBadLevelErr        = (-10012),        /* bad volume level setting */
  63.     telBadVTypeErr        = (-10013),        /* bad volume type error */
  64.     telVTypeNotSupp        = (-10014),        /* volume type not supported by this tool*/
  65.     telBadAPattErr        = (-10015),        /* bad alerting pattern specified */
  66.     telAPattNotSupp        = (-10016),        /* alerting pattern not supported by tool*/
  67.     telBadIndex            = (-10017),        /* bad index specified */
  68.     telIndexNotSupp        = (-10018),        /* index not supported by this tool */
  69.     telBadStateErr        = (-10019),        /* bad device state specified */
  70.     telStateNotSupp        = (-10020),        /* device state not supported by tool */
  71.     telBadIntExt        = (-10021),        /* bad internal external error */
  72.     telIntExtNotSupp    = (-10022),        /* internal external type not supported by this tool */
  73.     telBadDNDType        = (-10023),        /* bad DND type specified */
  74.     telDNDTypeNotSupp    = (-10024),        /* DND type is not supported by this tool */
  75.  
  76.     telFeatNotSub        = (-10030),        /* feature not subscribed */
  77.     telFeatNotAvail        = (-10031),        /* feature subscribed but not available */
  78.     telFeatActive        = (-10032),        /* feature already active */
  79.     telFeatNotSupp        = (-10033),        /* feature program call not supported by this tool */
  80.  
  81.     telConfLimitErr      = (-10040),        /* limit specified is too high for this configuration */
  82.     telConfNoLimit        = (-10041),        /* no limit was specified but required*/                  
  83.     telConfErr            = (-10042),        /* conference was not prepared */
  84.     telConfRej            = (-10043),        /* conference request was rejected */
  85.     telTransferErr        = (-10044),        /* transfer not prepared */
  86.     telTransferRej        = (-10045),        /* transfer request rejected */
  87.     telCBErr            = (-10046),        /* call back feature not set previously */
  88.     telConfLimitExceeded = (-10047),    /* attempt to exceed switch conference limits */
  89.  
  90.     telBadDNType        = (-10050),        /* DN type invalid */
  91.     telBadPageID        = (-10051),        /* bad page ID specified*/
  92.     telBadIntercomID    = (-10052),        /* bad intercom ID specified */
  93.     telBadFeatureID        = (-10053),        /* bad feature ID specified */
  94.     telBadFwdType        = (-10054),        /* bad fwdType specified */
  95.     telBadPickupGroupID = (-10055),     /* bad pickup group ID specified */
  96.     telBadParkID        = (-10056),        /* bad park id specified */
  97.     telBadSelect        = (-10057),        /* unable to select or deselect DN */
  98.     telBadBearerType    = (-10058),        /* bad bearerType specified */
  99.     telBadRate            = (-10059),        /* bad rate specified */
  100.     telDNTypeNotSupp    = (-10060),        /* DN type not supported by tool */
  101.     telFwdTypeNotSupp    = (-10061),        /* forward type not supported by tool */
  102.     telBadDisplayMode    = (-10062),        /* bad display mode specified */
  103.     telDisplayModeNotSupp = (-10063),    /* display mode not supported by tool */
  104.     telNoCallbackRef    = (-10064),        /* no call back reference was specified, but is required */
  105.  
  106.     telAlreadyOpen        = (-10070),        /* terminal already open */
  107.     telStillNeeded        = (-10071),        /* terminal driver still needed by someone else */
  108.     telTermNotOpen        = (-10072),        /* terminal not opened via TELOpenTerm */
  109.  
  110.     telCANotAcceptable     = (-10080),     /* CA not "acceptable" */
  111.     telCANotRejectable     = (-10081),     /* CA not "rejectable" */
  112.     telCANotDeflectable    = (-10082),        /* CA not "deflectable" */
  113.  
  114.     telPBErr            = (-10090),        /* parameter block error, bad format */
  115.     telBadFunction        = (-10091),        /* bad msgCode specified */
  116.  
  117. /*    telNoTools            = (-10101),           unable to find any telephone tools */
  118.     telNoSuchTool        = (-10102),        /* unable to find tool with name specified */    
  119.     telUnknownErr        = (-10103),        /* unable to set config */
  120.     telNoCommFolder        = (-10106),        /* Communications/Extensions ƒ not found */
  121.     telInitFailed        = (-10107),        /* initialization failed */
  122.  
  123.     telChooseDisaster        = chooseDisaster,
  124.     telChooseFailed            = chooseFailed,
  125.     telChooseAborted        = chooseAborted,
  126.     telChooseOKMinor        = chooseOKMinor,
  127.     telChooseOKMajor        = chooseOKMajor,
  128.     telChooseCancel            = chooseCancel,
  129.     
  130.     telChooseOKTermChanged    = 4
  131.  
  132. };
  133.  
  134.  
  135. enum {
  136.  
  137. /* PHYSICAL TERMINAL CONSTANTS */
  138.  
  139. /*HOOK STATE CONSTANTS */
  140.     telHandset            = 1,    /* handset hookswitch */
  141.     telSpeakerphone        = 2,    /* speakerphone 'on' switch */
  142.  
  143.     telDeviceOnHook     = 0,     /* device on hook */
  144.     telDeviceOffHook    = 1,    /* device off hook */
  145.  
  146. /* VOLUME CONTROL CONSTANTS */
  147.     telHandsetSpeakerVol = 1,     /* volume of the handset speaker */
  148.     telHandsetMicVol     = 2,     /* sensitivity of the handset mic */
  149.     telSpeakerphoneVol     = 3,     /* speakerphone volume */
  150.     telSpeakerphoneMicVol = 4,     /* sensitivity of the spkrphone mic */
  151.     telRingerVol         = 5,     /* volume of the ringer */
  152.  
  153.     telVolSame            = 0,     /* leaves the volume at previous level */
  154.     telVolMin            = 1,     /* turns volume down to minimum level, but not off */
  155.     telVolMax            = 100,  /* highest level allowed by the Telephone Manager */
  156.  
  157.     telVolStateSame        = 0,     /* leaves device in same state */
  158.     telVolStateOff        = 1,     /* turns the device off , */
  159.                                 /* but doesn't change the volume setting. */
  160.                                 /* Use for mute functions. */
  161.     telVolStateOn        = 2,     /* turns the device on.  Volume setting is */
  162.                                 /* the same as previously set.*/
  163.  
  164. /* DISPLAY CONSTANTS */
  165.     telNormalDisplayMode = 1,    /* normal display mode */
  166.     telInspectMode        = 2,    /* inspect display mode */
  167.     telMiscMode            = 3,    /* miscellaneous display mode */
  168.     telRetrieveMode        = 4,    /* message retrieval mode */
  169.     telDirectoryQueryMode = 5,    /* electronic directory mode */
  170.  
  171.     telEntireDisplay    = 0,    /* entire Display */
  172.  
  173. /* KEY PRESS CONSTANTS */
  174.     telHangupKey         = 1,    /* drop, or release, key pressed */
  175.     telHoldKey            = 2,    /* hold key pressed */
  176.     telConferenceKey    = 3,    /* conference key pressed */        
  177.     telTransferKey        = 4,    /* transfer key pressed */
  178.     telForwardKey        = 5,    /* call forward key pressed */
  179.     telCallbackKey        = 6,    /* call back key pressed */
  180.     telDNDKey            = 7,    /* do not disturb key pressed */
  181.     telCallPickupKey    = 8,    /* call Pickup key pressed */
  182.     telCallParkKey        = 9,    /* call Park key pressed */
  183.     telCallDeflectKey     = 10,    /* call Deflect key pressed */
  184.     telVoiceMailAccessKey = 11,    /* voice Mail Access key pressed */
  185.     telCallRejectKey    = 12,     /* call Reject key pressed */
  186.     telOtherKey            = 16,    /* other key pressed */
  187.  
  188.  
  189.     telKeyPadPress         = 1,    /* key pressed on 12 digit keypad*/        
  190.     telFeatureKeyPress    = 2,    /* feature Key Pressed */
  191.  
  192.     telTerminalEnabled    = 0,
  193.     telTerminalDisabled    = 1,
  194.  
  195. /* ALERT PATTERN */
  196.  
  197.     telPattern0            = 0,
  198.     telPattern1            = 1,
  199.     telPattern2            = 2,
  200.     telPattern3            = 3,
  201.     telPattern4            = 4,
  202.     telPattern5            = 5,
  203.     telPattern6            = 6,
  204.     telPattern7            = 7,
  205.     telPatternOff        = 8,
  206.     telPatternUndefined    = 15,
  207.  
  208. /* DN TYPES */
  209.  
  210.     telAllDNs            = 0,      /* counts all types of DNs */
  211.     telInternalDNs        = 1,     /* connected to PBX or other non-public switch */
  212.     telInternalDNsOnly    = 2,     /* connected to PBX or other non-public switch */
  213.                                 /* and able to place internal calls only */
  214.     telExternalDNs        = 3,     /* connected to public network */
  215.     telDNTypeUnknown    = 4,    /* DN type unknown */
  216.  
  217. /* CALL FORWARDING TYPES */
  218.  
  219.     telForwardImmediate    = 1,    /* immediately forward calls */
  220.     telForwardBusy         = 2,    /* forward on Busy */
  221.     telForwardNoAnswer     = 3,    /* forward on No answer */
  222.     telForwardBusyNA    = 4,    /* forwarding for busy and no answer*/
  223.     telForwardTypeUnknown = 5,    /* type of forwarding is unknown */
  224.  
  225. /* CALL FORWARDING MESSAGES */
  226.  
  227.     telForwardCleared    = 0,    /* forwarding has been cleared */
  228.     telForwardEst         = 1,     /* forwarding has been established*/
  229.     telForwardFailed    = 2,    /* attempt to setup forwarding has failed*/
  230.  
  231. /* DO NOT DISTURB TYPES */
  232.  
  233.     telDNDIntExt        = 0,    /* do not disturb for all internal and external calls*/
  234.     telDNDExternal        = 1,    /* do not disturb for external calls only */
  235.     telDNDInternal        = 2,    /* do not disturb for internal calls only */
  236.     telDNDNonIntercom    = 3,    /* do not disturb for all calls except intercom */
  237.  
  238. /* DO NOT DISTURB MESSAGES */
  239.  
  240.     telDNDCleared        = 0,    /* do not disturb has been cleared */
  241.     telDNDEst             = 1,     /* do not disturb has been established */
  242.     telDNDFailed        = 2,    /* attempt to setup do not disturb has failed */
  243.  
  244. /* VOICE MAIL MESSAGES */
  245.  
  246.     telAllVoiceMessagesRead = 0,/* all messages have been read, none are  waiting */
  247.                                 /* to be read */
  248.     telNewVoiceMessage     = 1,     /* a new message has arrived or messages are waiting */
  249.                                 /* for this DN */
  250.  
  251. /* DNSELECT MESSAGE */
  252.     telDNDeselected        = 0,    /* DN has been deselected */
  253.     telDNSelected        = 1,    /* DN has been selected */
  254.     
  255. /* CALL ORIGINATORS */
  256.     telInternalCall        = 0,    /* return nth internal CA */
  257.     telExternalCall        = 1,    /* return nth external CA */
  258.     telUnknownCallOrigin = 2,    /* unknown call type */
  259.     telAllCallOrigins     = 2,     /* return nth CA internal or external */
  260.  
  261. /* CALL TYPES */
  262.  
  263.     telVoiceMailAccessOut = (-7),
  264.     telPageOut            = (-6),
  265.     telIntercomOut        = (-5),
  266.     telCallbackOut        = (-4),
  267.     telPickup            = (-3),
  268.     telParkRetrieve        = (-2),
  269.     telNormalOut        = (-1),
  270.     telUnknownCallType    = 0,
  271.     telNormalIn         = 1,
  272.     telForwardedImmediate = 2,
  273.     telForwardedBusy    = 3,
  274.     telForwardedNoAnswer= 4,
  275.     telTransfer            = 5,
  276.     telDeflected        = 6, 
  277.     telIntercepted        = 7,                 
  278.     telDeflectRecall    = 8, 
  279.     telParkRecall        = 9, 
  280.     telTransferredRecall= 10,
  281.     telIntercomIn        = 11,
  282.     telCallbackIn        = 12,
  283.  
  284. /* DIAL TYPES */
  285.  
  286.     telDNDialable        = 0,    /* this DN could be dialed via TELSetupCall */
  287.     telDNNorthAmerican    = 1,    /* rmtDN is standard North America 10 digit number */
  288.     telDNInternational    = 2,    /* rmtDN is an international number */
  289.     telDNAlmostDialable    = 3,    /* rmtDN is almost dialable, */
  290.                                 /* missing prefix such as 9 or 1 */
  291.     telDNUnknown        = 15,    /* unknown whether DN is dialable */
  292.  
  293. /* CALL PROGRESS MESSAGES */
  294.  
  295.     telCAPDialTone         = 1,    /* dial tone */        
  296.     telCAPRinging        = 2,    /* destination CA is alerting */
  297.     telCAPDialing        = 3,    /* dialing the other end */
  298.     telCAPReorder         = 4,    /* reorder */
  299.     telCAPBusy             = 5,     /* busy */
  300.     telCAPRouted         = 6,     /* call routed; rmtDN will hold the routing directory */
  301.                                 /* number routeDN and routePartyName have been updated */
  302.     telCAPRoutedOff     = 7,    /* call routed off-network; no further progress will */
  303.                                 /* be available */ 
  304.     telCAPTimeout          = 8,    /* call timed out */
  305.     telCAPUpdate        = 9,    /* name and rmtDN information has been updated */
  306.     telCAPPrompt        = 10,    /* the network is prompting for more information */
  307.     telCAPWaiting        = 11,    /* call is proceeding, but there is no response yet */
  308.                                 /* from the destination */
  309.     telCAPUnknown        = 15,    /* call progress state unknown */
  310.  
  311. /* OUTGOING CALL MESSAGES */
  312.  
  313.     telPhysical            = 0,    /* user lifted handset and initiated call */
  314.     telProgrammatic        = 1,    /* programmatic initiation of outgoing call */
  315.  
  316. /* DISCONNECT MESSAGES */
  317.  
  318.     telLocalDisconnect    = 0,     /* local party, this user, responsible for disconnect */
  319.     telRemoteDisconnect = 1,    /* remote party responsible for disconnect */ 
  320.  
  321. /* DISCONNECT TYPES */
  322.  
  323.     telCADNormal         = 1,    /* normal disconnect */
  324.     telCADBusy             = 2,    /* remote user busy */
  325.     telCADNoResponse     = 3,    /* remote not responding */
  326.     telCADRejected        = 4,    /* call rejected */
  327.     telCADNumberChanged = 5,     /* number changed */
  328.     telCADInvalidDest     = 6,     /* invalid destination address */
  329.     telCADFacilityRejected = 7, /* requested facility rejected */
  330.     telCADUnobtainableDest = 9, /* destination not obtainable */
  331.     telCADCongested     = 10,     /* network congestion */
  332.     telCADIncompatibleDest = 11,/* incompatible destination */
  333.     telCADTimeout         = 12,    /* call timed out */
  334.     telCADUnknown         = 15,     /* reason unknown */
  335.  
  336. /* CONFERENCE MESSAGES */
  337.  
  338.     telConferencePrepFailed    = 0,    /* conference could not be prepared */
  339.     telConferencePending    = 1,    /* conference prepared successfully */
  340.     telConferenceEstFailed    = 2,    /* conference could not be established */
  341.     telConferenceEst        = 3,     /* conference established */
  342.     
  343. /* TRANSFER MESSAGES */
  344.  
  345.     telTransferPrepFailed    = 0,    /* transfer could not be prepared */
  346.     telTransferPending        = 1,    /* transfer prepared successfully */
  347.     telTransferEst            = 2,    /* consult or blind xfer successful */
  348.     telTransferFailed        = 3,    /* consult or blind xfer failed */
  349.     telTransferred            = 4,     /* message to originator of CA specifying */
  350.                                     /* that call was transferred to rmtDN */
  351.  
  352. /* HOLD MESSAGES */
  353.  
  354.     telHoldCleared            = 0,
  355.     telHoldEst                = 1,
  356.     telHoldFailed            = 2,
  357.  
  358. /* RECEIVE DIGIT MESSAGES */
  359.  
  360.     telDigitAudible         = 0,
  361.     telDigitNotAudible         = 1,
  362.  
  363. /* CALL PARK MESSAGES */
  364.  
  365.     telCallParkEst             = 1,     /* call has been successfully parked */
  366.     telCallParkRetrieveEst    = 2,    /* parked Call has been successfully retrieved */
  367.     telCallParkFailed        = 3,    /* attempt to setup call park has failed */
  368.     telCallParkRetrieveFailed = 4,     /* attempt to retrieve parked call failed */
  369.     telCallParkRecall        = 5,    /* call park has been recalled */
  370.  
  371. /* CALL BACK MESSAGES */
  372.  
  373.     telCallbackCleared        = 0,    /* call back has been cleared */
  374.     telCallbackEst             = 1,     /* call back has been established */
  375.     telCallbackNowAvail        = 2,    /* call can be called back with TELCallBackNow */
  376.                                     /* if CA is zero, else call IS calling back on CA */
  377.     telCallbackFailed        = 3,    /* attempt to setup callback has failed */
  378.     telCallbackDesired        = 4,    /* a user has called this terminal, received no */
  379.                                     /* answer and desires this terminal to call it */
  380.                                     /* back */
  381.     telCallbackDesiredCleared = 5,     /* call back for no answer no longer desired */
  382.     telCalledback            = 6,    /* callback has occurred successfully */
  383.  
  384. /* CALL REJECT MESSAGES */
  385.  
  386.     telCallRejectFailed        = 0,    /* attempt to reject call has failed */
  387.     telCallRejectEst          = 1,     /* call successfully rejected */
  388.     telCallRejected            = 2,    /* message to originator that call was rejected */
  389.  
  390. /* CALL DEFLECT MESSAGES */
  391.  
  392.     telCallDeflectFailed    = 0,      /* attempt to deflect call has failed */
  393.     telCallDeflectEst         = 1,     /* call successfully deflected */
  394.     telCallDeflectRecall     = 2,    /* deflected call has been recalled */
  395.     telCallDeflected        = 3,    /* message to originator that call was deflected */
  396.                                     /* to rmtDN */
  397.     telAutoDeflectImmediate    = 4,    /* a call was automatically deflected from this */
  398.                                     /* terminal as a result of immediate call */
  399.                                     /* forwarding */
  400.     telAutoDeflectBusy        = 5,    /* a call was automatically deflected from this */
  401.                                     /* terminal as a result of call forwarding on busy */
  402.     telAutoDeflectNoAnswer    = 6,    /* a call was automatically deflected from this */
  403.                                     /* terminal as a result of call forwarding on */
  404.                                     /* no answer */
  405.  
  406. /* CONFERENCE SPLIT MESSAGES */
  407.  
  408.     telConferenceSplitFailed = 0,    /* CA could not be split */
  409.     telConferenceSplitEst     = 1,    /* CA split successfully */
  410.  
  411. /* CONFERENCE DROP MESSAGES */
  412.  
  413.     telConferenceDropFailed     = 0,    /* CA could not be dropped */
  414.     telConferenceDropped     = 1,    /* CA dropped successfully */
  415.  
  416. /* CALL PICKUP MESSAGES */
  417.  
  418.     telCallPickupEst         = 0,    /* call pickup was successful */
  419.     telCallPickupFailed         = 1,    /* call pickup failed */
  420.     telCallPickedUp             = 2,    /* message to originator that call was picked */
  421.                                     /* up at a different DN */
  422.  
  423. /* PAGING MESSAGES */
  424.  
  425.     telPageEst                 = 0,    /* paging was successful */
  426.     telPageComplete             = 1,    /* paging activity completed */
  427.     telPageFailed             = 2,    /* paging failed */
  428.  
  429. /* INTERCOM MESSAGES */
  430.  
  431.     telIntercomEst             = 0,    /* intercom was successful */
  432.     telIntercomComplete         = 1,    /* intercom activity completed */
  433.     telIntercomFailed         = 2,    /* intercom failed */
  434.  
  435. /* MODEM TONE MESSAGES */
  436.  
  437.     telModemToneDetected     = 0,    /* modem tone was detected */
  438.     telModemToneCleared         = 1,    /* modem tone went away */
  439.  
  440. /* FAX TONE MESSAGES */
  441.  
  442.     telFaxToneDetected         = 0,    /* fax tone was detected */
  443.     telFaxToneCleared         = 1,    /* fax tone went away */
  444.  
  445. /* IN USE MESSAGES */
  446.  
  447.     telInUsePrivate             = 0,    /* MADN is in use and can't be accessed */
  448.     telInUseCanAccess         = 1,    /* MADN is in use, and others can access it */
  449.                                     /* and join in */
  450.     telInUseCanMakePrivate     = 2,    /* MADN is in use, but available for any one */
  451.                                     /* person to access */
  452.     telInUseCleared             = 3,    /* MADN is no longer in use */
  453.  
  454. /* CALL APPEARANCE STATES */
  455.  
  456.     telCAIdleState             = 0,    /* a call doesn't exist at this time */
  457.     telCAInUseState             = 1,     /* the call is active but at another terminal */
  458.     telCAOfferState             = 2,    /* a call is being offered to the terminal */
  459.     telCAQueuedState         = 3,    /* a call is being queued at this terminal */
  460.     telCAAlertingState         = 4,    /* a call is alerting at the terminal */
  461.     telCADialToneState         = 5,    /* initiated outgoing call has dialtone */
  462.     telCADialingState         = 6,    /* initiated outgoing call is dialing */
  463.     telCAWaitingState         = 7,    /* initiated outgoing call is waiting for */
  464.                                     /* response from destination */
  465.     telCARingingState         = 8,    /* the outgoing call is ringing. */
  466.     telCABusyState             = 9,    /* destination is busy or can't be reached */
  467.     telCAHeldState             = 10,    /* call has been put on hold by this terminal */
  468.     telCAConferencedState     = 11,    /* this CA is part of a conference now */
  469.     telCAActiveState         = 12,    /* the call is active and parties are free */
  470.                                     /* to exchange data */
  471.     telCAReorderState         = 13,    /* CA is in a reorder state */
  472.     telCAConferencedHeldState = 14,    /* CA is a conference call in a held state */
  473.     telCAUnknownState         = 15,    /* the call state is unknown */
  474.  
  475. /* TERMINAL MESSAGE EVENTMASKS */
  476.  
  477.     telTermHookMsg        = 0x00000001,     /* the hookswitch state has changed */    
  478.     telTermKeyMsg        = 0x00000002,     /* a phone pad key has been depressed */    
  479.     telTermVolMsg        = 0x00000004,    /* volume setting has changed */    
  480.     telTermDisplayMsg    = 0x00000008,    /* display has changed */        
  481.     telTermEnableMsg    = 0x00000010,    /* terminal has become enabled */    
  482.     telTermOpenMsg        = 0x00000020,    /* terminal has been opened */
  483.     telTermCloseMsg        = 0x00000040,    /* terminal is shutting down */            
  484.     telTermResetMsg     = 0x00000080,    /* terminal has been reset */        
  485.     telTermErrorMsg        = 0x00000100,    /* hard equipment error */        
  486.     telTermOtherMsg        = 0x80000000,    /* vendor defined error */
  487.     telAllTermMsgs        = 0x000001ff,    /* mask to all non tool specific terminal events */
  488.  
  489. /* DN MESSAGE EVENTMASK CONSTANTS */        
  490.     telDNForwardMsg        = 0x00000001,    /* forward feature activity */
  491.     telDNDNDMsg            = 0x00000002,    /* do not disturb feature activity */    
  492.     telDNVoiceMailMsg    = 0x00000004,    /* message has arrived for this DN */    
  493.     telDNSelectedMsg    = 0x00000008,    /* DN has been selected or deselected */
  494.     telDNOtherMsg        = 0x80000000,    /* a custom message for use by tools */
  495.     telAllDNMsgs        = 0x0000000f,    /* mask to all non tool specific dn events */
  496.  
  497. /* CA MESSAGE EVENTMASK CONSTANTS */        
  498.     telCAAlertingMsg        = 0x00000001,    /* CA is alerting  */
  499.     telCAOfferMsg            = 0x00000002,    /* CA is being offered a call */
  500.     telCAProgressMsg          = 0x00000004,    /* call progress info for this CA */
  501.     telCAOutgoingMsg        = 0x00000008,    /* CA is initiating an outgoing call */
  502.     telCADisconnectMsg        = 0x00000010,    /* CA disconnected (dropped or rmt disc */ 
  503.     telCAActiveMsg            = 0x00000020,    /* CA is active and voice/data is free */
  504.                                             /* to flow end to end */    
  505.     telCAConferenceMsg        = 0x00000040,    /* conference activity on CA */    
  506.     telCATransferMsg        = 0x00000080,    /* transfer feature activity */    
  507.     telCAHoldMsg            = 0x00000100,    /* hold feature activity */    
  508.     telCADigitsMsg            = 0x00000200,     /* remote signaling digits arrived */    
  509.     telCACallParkMsg        = 0x00000400,    /* CA call park feature activity */    
  510.     telCACallbackMsg        = 0x00000800,    /* CA call back feature activity  */    
  511.     telCARejectMsg            = 0x00001000,     /* CA is rejected */
  512.     telCADeflectMsg            = 0x00002000,     /* CA is deflected */
  513.     telCAForwardMsg            = 0x00004000,    /* CA is forwarded to this DN  */
  514.     telCAConferenceSplitMsg    = 0x00008000,     /* conference split activity  */
  515.     telCAConferenceDropMsg    = 0x00010000,     /* conference drop activity  */
  516.     telCAQueuedMsg            = 0x00020000,     /* CA has been queued  */
  517.     telCAInUseMsg            = 0x00040000,     /* CA is in use  */
  518.     telCACallPickupMsg        = 0x00080000,    /* CA pickup activity */
  519.     telCAPagingMsg            = 0x00100000,    /* CA paging activity */
  520.     telCAIntercomMsg        = 0x00200000,    /* CA intercom activity */
  521.     telCAModemToneMsg        = 0x00400000,    /* modem tones detected */
  522.     telCAFaxToneMsg            = 0x00800000,    /* fax tones detected */
  523.     telCAIdleMsg            = 0x01000000,    /* CA is in idle state */
  524.     telCASuccessiveAlertMsg    = 0x02000000,      /* phone is alerting, one per ring */
  525.     telCAUserUserInfoMsg    = 0x04000000,    /* user to user information has arrrived */
  526.                                             /* for this CA */
  527.     telCAOtherMsg            = 0x80000000,      /* tool specific CA message */
  528.     telAllCAMsgs            = 0x07ffffff    /* mask to all non tool specific CA events */
  529.  
  530. };
  531.  
  532. typedef OSErr TELErr;
  533.  
  534. typedef unsigned long TELFlags;
  535.  
  536. enum {
  537.     telNoMenus    = 1 << 16,        /* tells tool not to display any custom menus */
  538.     telQuiet    = 1 << 17        /* tells tool not to display any dialog boxes or alerts */
  539. };
  540.  
  541. typedef unsigned long TELFeatureFlags;
  542.  
  543. enum {
  544.     pcmAvail            = 1 << 0,        /* true if PCM voice data accessible */
  545.     hasHandset            = 1 << 1,        /* true if a phone handset is attached  */
  546.     hasSpeakerphone        = 1 << 2,        /* true if a 2 way speakerphone is attached */
  547.     canOnHookDial         = 1 << 3,        /* can on-hook dial */
  548.     hasRinger            = 1 << 4,        /* terminal has its own ringer */
  549.     canSetDisplay          = 1 << 5,        /* application can write to the display */
  550.     hasKeypad            = 1 << 6,        /* attached phone has standard 12 key pad */
  551.     hasVideo            = 1 << 7,        /* terminal has a videophone */
  552.     hasOther            = 1 << 8,        /* reserved for future use */
  553.     crossDNConference    = 1 << 9,        /* can perform cross-DN conferences */
  554.     hasSubaddress        = 1 << 10,        /* attached network supports subaddressing */
  555.     hasUserUserInfo     = 1 << 11        /* network supports user-to-user info */
  556.     /* other bits in FeatureFlags are reserved by Apple for future use */
  557. };
  558.  
  559.  
  560. struct TELTermRecord {
  561.     
  562.     short            tRef;
  563.     TELFeatureFlags    featureFlags;
  564.     short            handsetSpeakerVol;
  565.     short            handsetMicVol;
  566.     short            speakerphoneVol;
  567.     short            speakerphoneMicVol;
  568.     short            ringerVol;
  569.     short            otherVol;
  570.     short            ringerTypes;
  571.     short            hasDisplay;
  572.     short            displayRows;
  573.     short            numDNs;
  574.     short            maxAllocCA;
  575.     short            curAllocCA;
  576.     long            reserved;
  577. };
  578.  
  579. typedef struct TELTermRecord TELTermRecord;
  580. typedef TELTermRecord *TELTermPtr;
  581.  
  582.     
  583. struct TELRecord {
  584.     short                 procID;
  585.     
  586.     TELFlags            flags;
  587.     short                reserved;
  588.     
  589.     long                 refCon;
  590.     long                 userData;
  591.     
  592.     ProcPtr                defproc;
  593.     
  594.     Ptr                     config;
  595.     Ptr                     oldConfig;
  596.     
  597.     TELTermPtr             pTELTerm;
  598.     
  599.     long                telPrivate;
  600.     long                 reserved1;
  601.     long                reserved2;
  602.     
  603.     long                 pTELTermSize;
  604.     short                 version;
  605.     
  606. };
  607.  
  608. typedef struct TELRecord TELRecord;
  609. typedef TELRecord *TELPtr, **TELHandle;
  610.  
  611.  
  612. typedef unsigned long    TELDNFeatureFlags;
  613.  
  614. enum {
  615.     dndSub                    = 1 << 0,        /* do not disturb subscribed */
  616.     dndAvail                = 1 << 1,        /* do not disturb available */
  617.     dndActive                = 1 << 2,        /* do not disturb active */
  618.  
  619.     voiceMailAccessSub        = 1 << 3,        /* message waiting subscribed */
  620.     voiceMailAccessAvail     = 1 << 4,        /* message waiting available */
  621.     voiceMailAccessActive    = 1 << 5,        /* message waiting active */
  622.     
  623.     pagingSub                = 1 << 6,        /* paging is subscribed */
  624.     pagingAvail                = 1 << 7,        /* paging is available */
  625.     pagingActive            = 1 << 8,        /* paging is active */
  626.  
  627.     intercomSub                = 1 << 9,        /* intercom is subscribed */
  628.     intercomAvail            = 1 << 10,        /* intercom is available */
  629.     intercomActive            = 1 << 11,        /* intercom is active */
  630.  
  631.     dnSelectSub                = 1 << 12,        /* DN select is subscribed */
  632.     dnSelectAvail            = 1 << 13,        /* DN select is available */
  633.     dnSelectActive            = 1 << 14,        /* DN is selected */
  634.  
  635.     callPickupSub            = 1 << 15,        /* call pickup is subscribed */
  636.     callPickupAvail            = 1 << 16,        /* call pickup is available */
  637.  
  638.     dnInUse                    = 1 << 17,        /* a CA is allocated for this DN */
  639.     logicalDN                = 1 << 18,        /* this DN is not on this terminal */
  640.     dnAccessible            = 1 << 19,        /* commands can be sent to this DN */
  641.     canInitiate                = 1 << 20,        /* an outgoing CA can be initiated */
  642.     voiceMessageWaiting        = 1 << 21        /* voice mail waiting for this dn */
  643.     /* other bits in FeatureFlags are reserved by Apple for future use */
  644. };
  645.  
  646.  
  647. typedef unsigned long    TELDNForwardFlags;
  648.  
  649. enum {
  650.     immediateForwardSub        = 1 << 0,        /* immediate call forward subscribed */
  651.     immediateForwardAvail    = 1 << 1,        /* immediate call forward available */
  652.     immediateForwardActive    = 1 << 2,        /* immediate call forward active */    
  653.  
  654.     busyForwardSub            = 1 << 3,         /* forward on busy subscribed */
  655.     busyForwardAvail        = 1 << 4,         /* forward on busy available */
  656.     busyForwardActive        = 1 << 5,         /* forward on busy active */
  657.  
  658.     noAnswerForwardSub        = 1 << 6,         /* no answer call forward subscribed */
  659.     noAnswerForwardAvail    = 1 << 7,         /* no answer call forward available */
  660.     noAnswerForwardActive    = 1 << 8,         /* no answer call forward active */    
  661.  
  662.     busyNAForwardSub        = 1 << 9,         /* busy & no answer call forward subscribed */
  663.     busyNAForwardAvail        = 1 << 10,         /* busy & no answer call forward available */
  664.     busyNAForwardActive        = 1 << 11         /* busy & no answer call forward active */    
  665.     /* other bits in FwdFlags are reserved by Apple for future use */
  666. };
  667.     
  668.  
  669. struct TELDNRecord {
  670.  
  671.     short                 dnRef;            
  672.     StringPtr             dn;
  673.     StringPtr             dnPartyName;
  674.     StringPtr             dnSubaddress;
  675.     TELHandle             hTEL;    
  676.     short                 maxAllocCA;
  677.     short                 curAllocCA;
  678.     short                 dnType;
  679.     TELDNFeatureFlags     featureFlags;
  680.     short                 numPageIDs;
  681.     short                 numIntercomIDs;
  682.     short                 numPickupIDs;
  683.     TELDNForwardFlags     forwardFlags;
  684.     StringPtr             iForwardDN;
  685.     StringPtr             iForwardSubaddress;
  686.     StringPtr             iForwardPartyName;
  687.     StringPtr             bForwardDN;
  688.     StringPtr             bForwardSubaddress;
  689.     StringPtr             bForwardPartyName;
  690.     StringPtr             naForwardDN;
  691.     StringPtr             naForwardSubaddress;
  692.     StringPtr             naForwardPartyName;
  693.     short                 naForwardRings;
  694.     long                 telDNPrivate;
  695.     long                 refCon;
  696.     long                 userData;
  697.     long                 reserved;
  698. };
  699.  
  700. typedef struct TELDNRecord TELDNRecord;
  701. typedef TELDNRecord *TELDNPtr, **TELDNHandle;
  702.  
  703.  
  704. typedef unsigned long    TELCAFeatureFlags;
  705. enum {
  706.     holdSub                    = 1 << 0,    /* hold subscribed  */
  707.     holdAvail                = 1 << 1,    /* hold available  */
  708.     holdActive                = 1 << 2,    /* hold active  */
  709.  
  710.     conferenceSub            = 1 << 3,    /* conference subscribed */
  711.     conferenceAvail            = 1 << 4,    /* conference available */
  712.     conferenceActive        = 1 << 5,    /* conference active  */
  713.  
  714.     conferenceDropSub        = 1 << 6,    /* conference drop subscribed  */
  715.     conferenceDropAvail        = 1 << 7,    /* a call to TELDrop will drop this */
  716.                                         /* CA only from a conference */
  717.  
  718.     conferenceSplitSub        = 1 << 8,    /* conference split subscribed  */
  719.     conferenceSplitAvail    = 1 << 9,    /* conference split available for this CA */
  720.     numToConferenceRequired    = 1 << 10,    /* the number of CAs to be conferenced is */
  721.                                         /* required in TELConfPrep  */
  722.  
  723.     transferSub                = 1 << 11,    /* transfer subscribed  */
  724.     transferAvail            = 1 << 12,    /* transfer available  */
  725.     transferActive            = 1 << 13,    /* transfer active */
  726.  
  727.     caRelated                = 1 << 14    /* this CA is the specified in some */
  728.                                         /* other CA's relatedCA field  */
  729.     /*  other bits in FeaturesFlag are reserved by Apple for future use */
  730. };
  731.  
  732. typedef unsigned long    TELCAOtherFeatures;
  733. enum {
  734.     callbackSub            =    1 << 0,     /* call back subscribed */    
  735.     callbackAvail        =    1 << 1,        /* call back available */
  736.     callbackActive        =    1 << 2,        /* call back active  */
  737.     callbackClearSub    =    1 << 3,        /* call back clearing subscribed */
  738.  
  739.     callbackNowSub        =    1 << 4,        /* call back now subscribed */ 
  740.     callbackNowAvail    =    1 << 5,        /* call back now available  */
  741.  
  742.     callbackBusy        =    1 << 6,        /* call back on busy */
  743.     callbackNoAnswer    =    1 << 7,        /* call back on no answer */
  744.     callbackReturnsRef    =    1 << 8,        /* call back returns a reference */
  745.  
  746.     parkSub                =    1 << 9,        /* call park subscribed */
  747.     parkAvail            =    1 << 10,    /* call park available */
  748.     parkActive            =    1 << 11,    /* call park active */
  749.     parkRetrieveSub        =    1 << 12,    /* call park retrieve subscribed */
  750.     parkRetrieveWithID    =    1 << 13,    /* retrieve parked calls with IDs */
  751.     parkWithReturnedID    =    1 << 14,    /* park call to a specific remote ID */
  752.     parkWithGivenID        =    1 << 18,    /* for switch that requires ID for parking */
  753.  
  754.     rejectable            =    1 << 15,     /* CA is rejectable  */
  755.     deflectable            =    1 << 16,      /* CA is deflectable  */
  756.     acceptable            =    1 << 17      /* CA is acceptable */
  757.     /*  other bits in TELCAOtherFeatures are reserved by Apple for future use */
  758. };
  759.  
  760.  
  761. struct TELCARecord {
  762.     short                 caRef;
  763.     TELDNHandle             hTELDN;
  764.     TELHandle             hTEL;
  765.     short                 caState;
  766.     struct TELCARecord  **relatedCA;
  767.     long                 connectTime;        /* can be used by application to keep track of connect time */
  768.     short                 intExt;
  769.     short                 callType;
  770.     short                 dialType;
  771.     short                 bearerType;
  772.     short                 rate;
  773.     StringPtr             rmtDN;
  774.     StringPtr             rmtPartyName;
  775.     StringPtr             rmtSubaddress;
  776.     StringPtr             routeDN;
  777.     StringPtr             routePartyName;
  778.     StringPtr             routeSubaddress;
  779.     short                 priority;
  780.     short                 conferenceLimit;
  781.     TELCAFeatureFlags     featureFlags;
  782.     TELCAOtherFeatures     otherFeatures;
  783.     long                 telCAPrivate;
  784.     long                 refCon;
  785.     long                 userData;
  786.     long                 reserved;
  787. };
  788.  
  789. typedef struct TELCARecord TELCARecord;
  790. typedef TELCARecord *TELCAPtr, **TELCAHandle;
  791.  
  792.  
  793. /* Constants for HandleType in structure above */
  794. enum {
  795.     telHandleType    = 0,    /* feature requires a terminal handle */
  796.     telDNHandleType    = 1,    /* feature requires a DN handle */
  797.     telCAHandleType = 2        /* feature requires a CA handle */
  798. };
  799.  
  800. struct FeatureList {
  801.     short                featureID;
  802.     StringPtr            featureName;
  803.     short                 handleType;
  804.     struct FeatureList    *nextFeature;
  805. };
  806.  
  807. typedef struct FeatureList FeatureList;
  808. typedef FeatureList *FeatureListPtr;
  809.  
  810. /* CA MESSAGE STRUCTURES FOR MSGINFO */
  811.  
  812. struct CAGenericMsgRec {
  813.     StringPtr            rmtDN;
  814.     StringPtr            rmtName;
  815.     StringPtr            rmtSubaddress;
  816.     short                dialType;
  817. };
  818. typedef struct CAGenericMsgRec CAGenericMsgRec;
  819.  
  820. struct CAUserUserInfoMsgRec {
  821.     StringPtr            userUserInfo;
  822. };
  823.  
  824. typedef struct CAUserUserInfoMsgRec CAUserUserInfoMsgRec;
  825.  
  826. struct    CAConfMsgRec {
  827.     TELCAHandle            relatedCA;
  828. };
  829. typedef struct CAConfMsgRec CAConfMsgRec;
  830.  
  831.  
  832. struct CATransfMsgRec {
  833.     StringPtr            rmtDN;
  834.     StringPtr            rmtName;
  835.     StringPtr            rmtSubaddress;
  836.     short                dialType;
  837.     TELCAHandle            prepCA;
  838. };
  839. typedef struct CATransfMsgRec CATransfMsgRec;
  840.  
  841.  
  842.  
  843. typedef pascal void (*TELTermMsgProcPtr)(TELHandle hTEL, long msg, short mtype, 
  844.     short value, long globals);
  845.  
  846. typedef pascal void (*TELDNMsgProcPtr)(TELDNHandle hTELDN, long Msg, short mtype, 
  847.     short value, ConstStr255Param rmtDN, ConstStr255Param rmtName,
  848.     ConstStr255Param rmtSubaddress, long globals);
  849.  
  850. typedef pascal void (*TELCAMsgProcPtr)(TELCAHandle hTELCA, long Msg, short mtype,
  851.     short value, Ptr Msginfo, long globals);
  852.  
  853.  
  854. #ifdef __cplusplus
  855. extern "C" {
  856. #endif
  857.  
  858. pascal TELErr InitTEL();
  859.  
  860. pascal TELErr TELGetInfo(TELHandle hTEL);
  861. pascal TELErr TELOpenTerm(TELHandle hTEL);
  862. pascal TELErr TELResetTerm(TELHandle hTEL);
  863. pascal TELErr TELCloseTerm(TELHandle hTEL);
  864.  
  865. pascal TELErr TELTermMsgHand(TELHandle hTEL, long eventMask, 
  866.     TELTermMsgProcPtr msgProc, long globals);
  867. pascal TELErr TELClrTermMsgHand(TELHandle hTEL, TELTermMsgProcPtr msgProc);
  868. pascal TELErr TELTermEventsSupp(TELHandle hTEL, long *eventMask) ;
  869.  
  870. pascal short TELGetProcID(Str255 name);
  871. pascal TELHandle TELNew(short procID, TELFlags flags, long refCon, long userData);
  872. pascal TELErr TELDefault(Ptr *theConfig, short procID, Boolean allocate);
  873. pascal Boolean TELValidate(TELHandle hTEL);
  874. pascal Ptr TELGetConfig(TELHandle hTEL);
  875. pascal short TELSetConfig(TELHandle hTEL, Ptr thePtr);
  876. pascal TELErr TELChoose(TELHandle *hTEL, Point where, ProcPtr idleProc);
  877.  
  878. pascal Handle TELSetupPreflight(short procID, long *magicCookie);
  879. pascal void    TELSetupSetup(short procID, Ptr theConfig, short count,
  880.     DialogPtr theDialog, long *magicCookie);
  881. pascal Boolean TELSetupFilter(short procID, Ptr theConfig, short count,
  882.     DialogPtr theDialog, EventRecord *theEvent, short *theItem,
  883.     long *magicCookie);
  884. pascal void TELSetupItem(short procID, Ptr theConfig, short count,
  885.     DialogPtr theDialog, short *theItem, long *magicCookie);
  886. pascal void    TELSetupCleanup(short procID, Ptr theConfig, short count,
  887.     DialogPtr theDialog, long *magicCookie);
  888. pascal void    TELSetupXCleanup(short procID, Ptr theConfig, short count,
  889.     DialogPtr theDialog, Boolean OKed, long *magicCookie);
  890. pascal void    TELSetupPostflight(short procID);
  891.  
  892. pascal TELErr TELDispose(TELHandle hTEL);
  893.  
  894. pascal short TELCountDNs(TELHandle hTEL, short dnType, Boolean physical);
  895. pascal TELErr TELDNLookupByIndex( TELHandle hTEL, short dnType, Boolean physical, 
  896.     short index, TELDNHandle *hTELDN);
  897. pascal TELErr TELDNLookupByName(TELHandle hTEL, ConstStr255Param DN, 
  898.     TELDNHandle *hTELDN);
  899. pascal TELErr TELDNSelect(TELDNHandle hTELDN,  Boolean select);
  900. pascal TELErr TELDNDispose(TELDNHandle hTELDN);
  901. pascal TELErr TELGetDNInfo(TELDNHandle hTELDN);
  902. pascal TELErr TELGetDNFlags(TELDNHandle hTELDN, long *dnFeatureFlags,
  903.     long *dnForwardFlags);
  904.  
  905. pascal TELErr TELDNMsgHand ( TELDNHandle hTELDN, Boolean allDNs, long eventMask,
  906.     TELDNMsgProcPtr msgProc, long globals);        
  907. pascal TELErr TELClrDNMsgHand(TELDNHandle hTELDN, TELDNMsgProcPtr msgProc);
  908. pascal TELErr TELDNEventsSupp(TELDNHandle hTELDN, long *eventMask);
  909.  
  910. pascal short TELCountCAs(TELDNHandle hTELDN, short internalExternal);
  911. pascal TELErr TELCALookup(TELDNHandle hTELDN, short internalExternal, 
  912.     short index, TELCAHandle *hTELCA);
  913. pascal TELErr TELCADispose(TELCAHandle hTELCA);
  914. pascal TELErr TELGetCAState(TELCAHandle hTELCA, short *state);
  915. pascal TELErr TELGetCAFlags(TELCAHandle hTELCA, long *caFeatureFlags,
  916.     long *caOtherFeatures);
  917. pascal TELErr TELGetCAInfo(TELCAHandle hTELCA);
  918.  
  919. pascal TELErr TELCAMsgHand(TELDNHandle hTELDN, long eventMask, 
  920.     TELCAMsgProcPtr msgProc, long globals);
  921. pascal TELErr TELClrCAMsgHand(TELDNHandle hTELDN, TELCAMsgProcPtr msgProc);
  922. pascal TELErr TELCAEventsSupp(TELDNHandle hTELDN, long *eventMask);
  923.  
  924. pascal TELErr TELSetupCall(TELDNHandle hTELDN, TELCAHandle *hTELCA,
  925.     ConstStr255Param destDN, ConstStr255Param destName, 
  926.     ConstStr255Param destSubaddress, ConstStr255Param userUserInfo, 
  927.     short bearerType, short rate);
  928. pascal TELErr TELConnect(TELCAHandle hTELCA);
  929. pascal TELErr TELDialDigits(TELCAHandle hTELCA, ConstStr255Param digits);
  930.  
  931. pascal TELErr TELAcceptCall(TELCAHandle hTELCA);
  932. pascal TELErr TELRejectCall(TELCAHandle hTELCA, short reason);
  933. pascal TELErr TELDeflectCall(TELCAHandle hTELCA, ConstStr255Param rmtDN,
  934.     ConstStr255Param rmtName, ConstStr255Param rmtSubaddress);
  935. pascal TELErr TELAnswerCall(TELCAHandle hTELCA);
  936. pascal TELErr TELDrop(TELCAHandle hTELCA, ConstStr255Param userUserInfo);
  937.  
  938. pascal TELErr TELHold(TELCAHandle hTELCA);
  939. pascal TELErr TELRetrieve(TELCAHandle hTELCA);
  940.  
  941. pascal TELErr TELConferencePrep(TELCAHandle hTELCA1, TELCAHandle hTELCA2, 
  942.     short numToConference);
  943. pascal TELErr TELConferenceEstablish(TELCAHandle hTELCA1, TELCAHandle hTELCA2);
  944. pascal TELErr TELConferenceSplit(TELCAHandle hTELCA);
  945.  
  946. pascal TELErr TELTransferPrep(TELCAHandle hTELCA1, TELCAHandle hTELCA2);
  947. pascal TELErr TELTransferEstablish(TELCAHandle hTELCA1,TELCAHandle hTELCA2);
  948. pascal TELErr TELTransferBlind(TELCAHandle hTELCA, ConstStr255Param rmtDN,
  949.     ConstStr255Param rmtName, ConstStr255Param rmtSubaddress);
  950.  
  951. pascal TELErr TELForwardSet(TELDNHandle hTELDN, ConstStr255Param forwardDN, 
  952.     ConstStr255Param forwardName, ConstStr255Param forwardSubaddress,
  953.     short forwardType, short numrings);
  954. pascal TELErr TELForwardClear(TELDNHandle hTELDN, short forwardType);
  955.  
  956. pascal TELErr TELCallbackSet(TELCAHandle hTELCA, short *callbackRef);
  957. pascal TELErr TELCallbackClear(TELHandle hTEL, short callbackRef);
  958. pascal TELErr TELCallbackNow(TELCAHandle hTELCA, short callbackRef);
  959.  
  960. pascal TELErr TELDNDSet(TELDNHandle hTELDN, short dndType);
  961. pascal TELErr TELDNDClear(TELDNHandle hTELDN, short dndType);
  962.  
  963. pascal TELErr TELCallPickup(TELCAHandle hTELCA, ConstStr255Param pickupDN, 
  964.     short pickupGroupID);
  965.  
  966. pascal TELErr TELParkCall(TELCAHandle hTELCA, StringPtr *parkRetrieveID,
  967.     ConstStr255Param parkID);
  968. pascal TELErr TELRetrieveParkedCall(TELCAHandle hTELCA,
  969.     ConstStr255Param parkRetrieveID);
  970.  
  971. pascal TELErr TELVoiceMailAccess(TELCAHandle hTELCA);
  972. pascal TELErr TELPaging(TELCAHandle hTELCA, short pageID);
  973. pascal TELErr TELIntercom(TELCAHandle hTELCA, short intercomID);
  974.  
  975. pascal TELErr TELOtherFeatureList(TELHandle hTEL, FeatureListPtr *fList);
  976. pascal TELErr TELOtherFeatureImplement(TELHandle hTEL, Handle theHandle,
  977.     short featureID);
  978. pascal TELErr TELToolFunctions(TELHandle hTEL, short msgcode,
  979.     Boolean *supportsIt);
  980. pascal TELErr TELOtherFunction(TELHandle hTEL, Ptr paramblock, long size);
  981.  
  982. pascal TELErr TELGetHooksw(TELHandle hTEL, short hookType, Boolean *onHook );
  983. pascal TELErr TELSetHooksw(TELHandle hTEL, short hookType, Boolean onHook );
  984. pascal TELErr TELGetVolume(TELHandle hTEL, short volType, short *level, 
  985.     short *volState);
  986. pascal TELErr TELSetVolume(TELHandle hTEL, short volType, short *level,
  987.     short volState);
  988. pascal TELErr TELAlert(TELHandle hTEL, short *level, short alertPattern);
  989. pascal TELErr TELGetDisplay(TELHandle hTEL, short index, short *displayMode,
  990.     StringPtr *text);
  991. pascal TELErr TELSetDisplay(TELHandle hTEL, short index, short displayMode,
  992.     ConstStr255Param text);
  993.  
  994. pascal void TELIdle(TELHandle hTEL);
  995. pascal void    TELActivate(TELHandle hTEL, Boolean activate);
  996. pascal void    TELResume(TELHandle hTEL, Boolean resume);
  997. pascal Boolean TELMenu(TELHandle hTEL, short menuID, short item);
  998. pascal void    TELEvent(TELHandle hTEL, const EventRecord *theEvent);
  999. pascal void    TELGetToolName(short procID, Str255 name);
  1000. pascal Handle TELGetVersion(TELHandle hTEL);
  1001. pascal short TELGetTELVersion();
  1002.  
  1003. pascal TELErr TELIntlToEnglish(TELHandle hTEL, Ptr inputPtr, 
  1004.     Ptr *outputPtr, short language);
  1005. pascal TELErr TELEnglishToIntl(TELHandle hTEL, Ptr inputPtr, 
  1006.     Ptr *outputPtr, short language);
  1007.  
  1008.  
  1009. #ifdef __cplusplus
  1010. }
  1011. #endif
  1012.  
  1013.  
  1014. #endif __TELEPHONES__
  1015.